import request from '@/config/axios'

export interface MomentLogVO {
  id: number
  jobType: number
  toUserList: string
  sender: string
  content: string
  jobid: string
  attachmentType: number
  imgUrl: string
  linkTitle: string
  linkDesc: string
  linkPicUrl: string
  linkUrl: string
}

// 查询朋友圈记录列表
export const getMomentLogPage = async (params) => {
  return await request.get({ url: `/wecom/moment-log/page`, params })
}

// 查询朋友圈记录详情
export const getMomentLog = async (id: number) => {
  return await request.get({ url: `/wecom/moment-log/get?id=` + id })
}

// 新增朋友圈记录
export const createMomentLog = async (data: MomentLogVO) => {
  return await request.post({ url: `/wecom/moment-log/create`, data })
}

// 修改朋友圈记录
export const updateMomentLog = async (data: MomentLogVO) => {
  return await request.put({ url: `/wecom/moment-log/update`, data })
}

// 删除朋友圈记录
export const deleteMomentLog = async (id: number) => {
  return await request.delete({ url: `/wecom/moment-log/delete?id=` + id })
}

// 导出朋友圈记录 Excel
export const exportMomentLog = async (params) => {
  return await request.download({ url: `/wecom/moment-log/export-excel`, params })
}
// 客户范围
export const treeList = async (params) => {
  return await request.get({ url: `/wecom/we-tag-group/tree-list`, params })
}
